package com.example.springboot2022nocv.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

/**
 * @author 程序员小洋
 * @version 2022.3
 * @date 2022/12/28 00:38
 * @title
 */
@SuppressWarnings("all")
@TableName("user")
@Data
public class User {

    @TableId(type = IdType.AUTO)
    private Integer id;
    private String username;
    private String password;
    private String salt;
    private String sex;
    private Integer age;
    private String address;
    private String img; 
    private String phone;
    private String card;

    /**
     * 以下实际上作为外键使用
     */
    private Integer banJiId;
    private Integer xueYuanId;
    private Integer teacherId;

    // 非数据库列
    // 班级名字
    @TableField(exist = false)
    private String banJiName;

    // 非数据库列
    // 学院名字
    @TableField(exist = false)
    private String xueYuanName;

    // 非数据库列
    // 老师名字
    @TableField(exist = false)
    private String teacherName;



}
